import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:输出一个整数的每一位，如123输出每一位是3、2、1
 * User: xwl
 * Date: 2023-04-02
 * Time: 16:49
 */
public class Test2 {
    public static void main(String[] args) {
        //循环输入
        Scanner scan = new Scanner(System.in);
        while(scan.hasNextInt()) {
            int input = scan.nextInt();
            //定义一个局部变量暂存input
            int tmp = input;
            //定义一个计数器
            int count = 0;
            while(tmp != 0) {
                tmp /=10;
                count++;
            }
            tmp = input;
            //输出
            while(tmp != 0) {
                System.out.println(tmp%10);
                tmp /= 10;
            }
        }
    }
}
